<?php

class FormationType extends Zend_Db_Table_Abstract {
    protected $_name = "formation_type";
    private $dbAdapter;

    public function init() {
        $this->dbAdapter = Zend_Db_Table::getDefaultAdapter();
        $this->dbAdapter->setFetchMode(Zend_Db::FETCH_OBJ);
    }

    public function GetFormationTypeById($id){
        try{
            return $this->dbAdapter->fetchAll($this->select()->where('id=?',$id));
        } catch (Zend_Exception $e) {
            echo "Error message: " . $e->getMessage() . "\n";
            exit;
        }
    }

}

